jsx3.Class.defineClass(
        "tibco.admin.monitormanage.uicomponents.text.serviceUnitHeader.ServiceUnitHeader", //the full name of the class to create
        jsx3.gui.Block, //  extends
        null, // implements
        function (plugin) {
        
            plugin.prototype.init = function() {
                this.jsxsuper();
            }
            
            plugin.prototype.getNamespace = function() {
               return "tibco.admin";
            }
            
            plugin.prototype.setUpComponent = function() {
            	var subject = tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceUnitInfoCacheSubject;
            	tibco.admin.monitormanage.general.PageBusUtils.subscribe(subject, this.handleDisplayScreen, this);
            }
            
            plugin.prototype.handleDisplayScreen = function(subject, message, headerObj) {
            	headerObj.loadContent(headerObj);
            }
            
            plugin.prototype.loadContent = function(headerObj) {
           		var serviceUnitInfoDoc = tibco.admin.Main.getServer().Cache.getDocument(tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceUnitInfoCacheId);
       		 	if(serviceUnitInfoDoc)
       		 	{
           			var record = serviceUnitInfoDoc.getFirstChild();
            			
           			var nameField = headerObj.getDescendantOfName("serviceUnitNameLabel_MM_dply");
           			nameField.setText(record.getAttribute("name"));
           			nameField.repaint();
            	}
            }

        });